﻿@{
    ViewBag.Title = "问题反馈";
    var uploadFiles = ServiceFactory.UploadFilesServiceInstance.GetFiles(NeedUploadFileDataTableEnums.InsuranceWarrantyRecordFeedBackIusses, Model != null ? Model.ID : 0).ToList();
}
@using ZBJF.Warranty.BLL
@using ZBJF.Warranty.Common.Enums.System
@model ZBJF.Warranty.Model.InsuranceWarrantyRecordFeedBackIusses
<script src="~/Scripts/WarrantyRecord/warrantyRecord.js"></script>

@using (Html.BeginForm("SaveFeedbackIssue", "ServiceProviderWorkOrder", FormMethod.Post, new { id = "mvcForm", name = "mvcForm", @class = "form-horizontal", enctype = "multipart/form-data" }))
{
    @Html.AntiForgeryToken()
    @Html.HiddenFor(m => m.ID)
    @Html.HiddenFor(m => m.InsuranceWarrantyRecordID)
    <h5>请在下方天填写问题详情</h5>
    @Html.TextAreaFor(m => m.IssueDesc, new { @class = "w-p98" })
    <h5>上传相关附件</h5>
    <span class="showFileName"></span>
    <a href="javascript:;" class="file margin-l-10">
        <input type="file" id="UploadFile" name="UploadFile" multiple="multiple" />选择附件
    </a>
    <table class="table table-responsive table-bordered table-hover">
        <tr>
            <th>附件名称</th>
            <th>查看附件</th>
            <th>上传人</th>
            <th>上传时间</th>
        </tr>
        @for (int i = 0; i < uploadFiles.Count; i++)
        {
            var file = uploadFiles[i];
            <tr>
                <td>
                    @file.FileName
                </td>
                <td>
                    <a class='Edit-R' href='javascript:void(0);' onclick="showImageLayer(this, 'ImageLook.html')" imgurl="@(file.FileName)">
                        查看图片
                    </a>
                </td>
                <td>
                    @file.CreateBy
                </td>
                <td>
                    @file.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")
                </td>
            </tr>
        }
    </table>
    <div class="form-actions text-center">
        <input class="btn btn-primary Edit-R" type="submit" value="提交">
        <input class="btn" onclick="layer.closeAll()" type="button" value="取消">
    </div>
}
